<?php
	echo $this->Html->script('jquery.lightbox-0.5.pack');
	echo $this->Html->css('jquery.lightbox-0.5');
?>
    <div class="product-box">
        <h3>
            <a href="<?php echo Router::url(array('controller' => 'products', 'action' => 'index')); ?>"><?php echo __('Sản phẩm', true); ?></a> 
            <?php if (isset($cat_name)) : ?>
            &RightTriangle; <?php echo $cat_name; ?>
            <?php endif; ?>
            <?php if (isset($cat_name2)) : ?>
            &RightTriangle; <?php echo $cat_name2; ?>
            <?php endif; ?>
        </h3>
        <?php
            echo $session->flash();
        ?>	
        <div class="row-fluid" align="center" style="padding-top: 20px;">
            <div>
                <?php
                $img = (empty($products['Product']['img'])? "no_image.gif" : $products['Product']['img'] );

                        echo $html->image("products/{$img}",
                                        array(
                                                'alt'		=> $products['Product']['name_'.$lang],
                                                'height'	=> '250px',
                                                'align'		=> 'center'
                                        )
                        );
                ?>
                <?php 
                 echo "<div align='center'><strong>".$products['Product']['name_'.$lang]."</strong></div>";
                if ($products['Product']['type'] == 1) {
                        echo "<div align='center'><strong style='color:#333'>".__('Contact', true)."</strong></div>";
                }
                else {
                        echo "<div align=\"center\" style=\"padding:5px 0px;\"><span class=\"price\">".number_format($products['Product']['price'],0,' ','.')." VNĐ</span></div>";
                        if ($products['Product']['isOutStock'] == 0) { ?>
                                <div align="center">
                                        <div id="mua"><a href="<?php echo Router::url(array('controller' => 'product','action' => 'order',$products['Product']['id'],'detail'));?>" class="btn btn-danger"><?php echo __('Order', true); ?></a></div>
                                </div>
                        <?php
                        }
                        else {
                        ?>
                                <div align="right">
                                        <div class="sold">
                                        <?php echo $html->image('button_sold_out_'.$lang.'.gif')?>
                                        </div>
                                </div>
                        <?php
                        }
                }?>

            </div>
            <div>
            </div>
        </div>
        <div style="padding-top: 50px;">
            <h3>Sản phẩm khác</h3>
            <?php
                    /*-------
                     * Render Module ProductType - product_types
                     * (path:  /plugins/module/widget_controller.php)
                     * ------*/
                    echo $this->requestAction(
                            array(
                                    'plugin'		=> 'module',
                                    'controller'	=> 'widget',
                                    'action'		=> 'other_products',
                                    'type'       	=> $products['Product']['type'],
                                    'id'       		=> $products['Product']['id']
                            )
                    );
            ?>
	</div>
</div>
